Compiler Optimizations Should Pay for Themselves

نویسنده

  • Michael Franz
چکیده

Optimizing compilers tend to be much larger and much slower than their straightforward counterparts. Their designers usually do not follow Oberon's maxim of making things "as simple as possible", but are inclined to completely disregard cost (in terms of compiler size, compilation speed, and maintainability) in favor of code_quality benefits that often turn out to be relatively marginal. Trying to make an optimizing compiler as simple as possible and yet as powerful as necessary requires, before all else, a measurement standard, by which both simplicity and power can be judged. For a compiler that is written in the language it compiles, two such standards are easily found by considering first the time required for self_compilation, and then the size of the resulting object program. With the help of these benchmarks, one may pit simplicity against power, requiring that every new capability added to the compiler "pays its own way" by creating more benefit than cost on account of at least one of the measures. This paper reports of a project for adding an optimization phase to an existing Oberon compiler, resulting in a higher object_code density and an improved run_time performance of compiled code. The beneficial effects of the optimization are greater than the costs, so that the improved compiler is smaller than its predecessor when compiled by itself, while it runs almost as fast.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Understanding the behavior of compiler optimizations

Compiler writers usually follow some known rules of thumb on the effectiveness of optimizations when implementing compilers. While many of these rules may be correct, it is a far better methodology to base implementation decisions on a scientific evaluation of optimizations. To this end, we present an exploration of the costs and benefits of optimizations implemented in Jikes RVM, a research vi...

متن کامل

Evaluating Runtime - Compiled Value - Speci c Optimizations 1 Evaluating Runtime - Compiled Value - Speci c Optimizations

Traditional compiler optimizations are either dataindependent or optimize around common data values while retaining correct behavior for uncommon values. This paper examines value-speci c data-dependent optimizations (VSO), where code is optimized at runtime around particular input values. Because VSO optimizes for the speci c case, the resulting code is more e cient. However, since optimizatio...

متن کامل

Specifying and Executing Optimizations for Parallel Programs

Compiler optimizations, usually expressed as rewrites on program graphs, are a core part of all modern compilers. However, even production compilers have bugs, and these bugs are difficult to detect and resolve. The problem only becomes more complex when compiling parallel programs; from the choice of graph representation to the possibility of race conditions, optimization designers have a rang...

متن کامل

Specifying and executing optimizations for generalized control flow graphs

Compiler optimizations, usually expressed as rewrites on program graphs, are a core part of modern compilers. However, even production compilers have bugs, and these bugs are difficult to detect and resolve. In this paper we present Morpheus, a domain-specific language for formal specification of program transformations, and describe its executable semantics. The fundamental approach of Morpheu...

متن کامل

The Limits of Alias Analysis for Scalar Optimizations

In theory, increasing alias analysis precision should improve compiler optimizations on C programs. This paper compares alias analysis algorithms on scalar optimizations, including an analysis that assumes no aliases, to establish a very loose upper bound on optimization opportunities. We then measure optimization opportunities on thirty-six C programs. In practice, the optimizations are rarely...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1998